package com.mallcloud.mall.app.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mallcloud.mall.common.core.util.R;
import com.mallcloud.mall.mall.api.entity.XglCouponViewModel;
import com.mallcloud.mall.mall.api.entity.vo.XglCouponViewVO;
import com.mallcloud.mall.mall.service.XglCouponViewService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 支持自定义券背景图片
 */
@Api(tags = "app-星光里积分券")
@RestController
@AllArgsConstructor
@RequestMapping("/app/xglPointsCoupon")
public class AppXglPointsCouponController {
	private final XglCouponViewService xglCouponViewService;

	@ApiOperation("星光里券-分页")
	@GetMapping("/page")
	public R<IPage<XglCouponViewVO>> xglCouponPage(Page<XglCouponViewVO> page, XglCouponViewModel dto) {
		return R.ok(xglCouponViewService.pageXglCoupon(page, dto));
	}
}